﻿@using QInfrastructure.Models.SystemManager;
@{
	Layout = null;

	var ThemeList = new List<string>()
	{
		"default","black","bootstrap","gray","material","material-blue","material-teal",
		"metro","metro-blue","metro-gray","metro-green","metro-orange","metro-red","ui-cupertino","ui-dark-hive",
		"ui-pepper-grinder","ui-sunny"
	};
	var random = new Random();
	var themeIndex = random.Next(0, ThemeList.Count);
	themeIndex = 1;

	var CurrentUser = ViewBag.CurrentUser as SystemUser ??new SystemUser();
	ViewData.TryGetValue("CurrentTheme", out var currentTheme);
	string currentThemeName = "default";
	if (currentTheme != null && currentTheme is SystemUserTheme cTheme)
	{
		currentThemeName = cTheme.ThemeName;
	}

}

<!DOCTYPE html>
<html  lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<title>@AppRuntimes.Instance.AppName</title>
	<link href="~/lib/jquery-easyui/themes/@currentThemeName/easyui.css" rel="stylesheet" id="PageThemeHref" />
	<link rel="stylesheet" type="text/css" href="~/lib/jquery-easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="~/lib/jquery-easyui/demo/demo.css">
	<link rel="stylesheet" type="text/css" href="~/lib/jquery-easyui/themes/jquery-extension-icons/icon-metro.css" rel="stylesheet" />
	<script type="text/javascript" src="~/lib/jquery-easyui/jquery.min.js"></script>
	<script type="text/javascript" src="~/lib/jquery-easyui/jquery.easyui.min.js"></script>
	<script src="~/lib/jquery-easyui/plugins/datagrid-cellediting.js"></script>
	<script type="text/javascript" src="~/lib/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
	<script src="~/lib/layer/layer.js"></script>
	<script src="~/js/G.js"></script>
	<script src="~/js/navMenu.js"></script>
	<script src="~/js/commonFunc.js"></script>
	<script src="~/js/index.js"></script>
	<script src="~/js/topMenu.js"></script>

</head>

<body>
	
	<input type="hidden" id="SystemUserId" value="@CurrentUser.Id" />
	<div class="easyui-layout" style="margin:0;padding:0px" data-options="fit:true,border:false" >
		<div data-options="region:'north',height:0" style="margin:0;padding:0;">
			<span style="margin-left:20px;text-align:center;vertical-align:middle;font-size:20px;">XxxxxxXX系统</span>
			<div style="float:right;margin-right:40px;">
				
				<a style="margin-right:100px;vertical-align:middle;">当前用户: <span>@CurrentUser.UserName</span></a>
				<a href="#" class="easyui-linkbutton" data-options="plain:true">主页</a>
				<a href="#" class="easyui-menubutton" data-options="iconCls:'icon-edit'">编辑</a>
				<a href="#" class="easyui-menubutton" data-options="iconCls:'icon-help'">帮助</a>
				<a href="#" class="easyui-menubutton" data-options="iconCls:'icon-metro-cog2',menu:'#mm_xitong'">系统</a>
			</div>
		</div>
		<div data-options="region:'west',split:true" title="菜单栏" style="width:250px;">
			<ul class="easyui-tree" id="main_menu"></ul>
		</div>
		<div data-options="region:'south'" style="height:20px;margin:0;padding:0;text-align:center">
			<span style="text-align:center;width:100%;font-size:10px;">版权所有@lianshan.com</span>
		</div>
		
		<div data-options="region:'center',border:false">
			<div id="maintabs" class="easyui-tabs" data-options="fit:true,border:false,plain:true">
				<div title="主页" style="padding:10px"></div>

			</div>
		</div>




		<div id="mm_xitong" style="width:150px;">
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-metro-newspaper'"  onclick="TopMenuFunc.ShowUserInfo()">用户信息</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-metro-key2'" onclick="TopMenuFunc.ModifyUserPwd()">修改密码</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-metro-css3'">
				<span>更换主题</span>
				<div style="width:150px;">
					<div class="menu-sep"></div>
					@foreach (var item in ThemeList)
					{
						if (item == currentThemeName)
						{
							<div data-options="iconCls:'icon-ok'" onclick="TopMenuFunc.ChangeUserTheme('@item')">@item</div>
						}
						else
						{
							<div onclick="TopMenuFunc.ChangeUserTheme('@item')">@item</div>
						}
						
					}
				</div>
			</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-metro-switch'" onclick="TopMenuFunc.LogOut()">退出</div>

		</div>
	</div>

</body>
</html>